﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading;
using Microsoft.Xna.Framework;

namespace GameName1
{
    internal class WeaponReloading : WeaponState
    {
        public WeaponReloading(IWeapon weapon)
        {
            var t = new Thread(()=>Reload(weapon));
            t.Start();
        }

        public override void Fire(IWeapon weapon, Projectile p)
        {

        }

        private void Reload(IWeapon weapon)
        {
            var timer = new Stopwatch();
            timer.Start();

            while (timer.ElapsedMilliseconds <= 500)
            {
                
            }

            weapon.setState(new WeaponReady(weapon));
        }
}
}
